import * as vscode from 'vscode'
import * as path from 'path'

const DIST_BUILD_DIR = 'distbuild'
export const ENV_DIR = path.join(DIST_BUILD_DIR, 'env');
export const CONFIG_DIR = path.join(DIST_BUILD_DIR, 'config');
export const BIN_DIR = path.join(DIST_BUILD_DIR, 'bin');
/*
switch (phase) {
    case DCC_PHASE_STARTUP:
        return "Startup";
    case DCC_PHASE_BLOCKED:
        return "Blocked";
    case DCC_PHASE_COMPILE:
        return "Compile";
    case DCC_PHASE_CPP:
        return "Preprocess";
    case DCC_PHASE_CONNECT:
        return "Connect";
    case DCC_PHASE_SEND:
        return "Send";
    case DCC_PHASE_RECEIVE:
        return "Receive";
    case DCC_PHASE_DONE:
        return "Done";
    default:
        return "Unknown";
    }
*/
export interface DistBuildDefinition extends vscode.TaskDefinition {
    command: string,
    group: string,
    args: string[]
}

export class DistBuildHostDefinition {
    address: string = ""
    port: number = 0
    jobs: number = 0
    state: DistBuildHostState = DistBuildHostState.RUN
}
export enum DistBuildHostState {
    STOP,
    RUN
}

export class DistBuildStateFile {
    filename: string = ""
    state: string = ""
}

export class DistBuildStateDefinition {
    address: string = ""
    files: DistBuildStateFile[] = []
}
